#include <iostream>
#include <string>
#include <regex>


int main()
{
    std::string str = "/numbers/1234";


    // 下面的e规定了要从str中提取出一/numbers/为开头的，连续的一个或多个字符
    std::regex e("/numbers/(\\d+)");
    std::smatch matches;

    bool ret = std::regex_match(str, matches, e);
    if (ret == true)
    {
        for(auto& s :matches)
        {
            std::cout << s << std::endl;
        }
    }
    else{
        return 0;
    }
}
